linux | 您所在的位置:网站首页 › file ascii text › linux |
Answering the X part of this XY problem, I would recommend you investigate the reason your binary file transfers don't transfer properly. If it turns out the reason is because you don't have an 8-bit clean datapath you could then use existing tools that were created to handle this situation, such as base64 or even uuencode. Old but still very effective. tar czvf - /etc/h* | base64 >/tmp/tar.tgz.b64 ls -l /tmp/tar.tgz.b64 -rw-r--r-- 1 root root 7364 May 26 11:52 /tmp/tar.tgz.b64 ... base64 -d /tmp/tar.tgz.b64 | tar tzvf -or tar czvf - /etc/h* | uuencode - >/tmp/tar.tgz.uue ls -l /tmp/tar.tgz.uue -rw-r--r-- 1 root root 7530 May 26 11:51 /tmp/tar.tgz.uue ... uudecode /tmp/tar.tgz.uue | tar xzvf - |
CopyRight 2018-2019 实验室设备网 版权所有 |